﻿using EFModel;
using IServices;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Y2.Filters;

namespace Y2.Controllers
{
    [LoginFilter]
    public class salary_grantSeController : Controller
    {
        private readonly Isalary_grant he;

        public salary_grantSeController(Isalary_grant he)
        {
            this.he = he;
        }
        public IActionResult salary_grantSe()
        {
            return View();
        }
        public IActionResult salary_grantSeQuer(string id)
        {
            ViewBag.salary_grant_id = id;
            return View();
        }
        //薪酬发放通过查询
        public async Task<IActionResult> Sequ(int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.Sequ(currentPage, pageSize)));
        }
        //薪酬发放复核通过模糊查询
        public async Task<IActionResult> QuerG0(salary_grant _File, int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.QuerG0(_File,currentPage,pageSize)));
        }
        //薪酬编号查询
        public async Task<string> ChaXbh()
        {
            return await he.ChaXbh();
        }
    }
}
